package com.bilubi.reggie.reggie.mapper;

import com.bilubi.reggie.reggie.annotation.AutoFill;
import com.bilubi.reggie.reggie.bean.Order;
import com.bilubi.reggie.reggie.bean.User;
import com.bilubi.reggie.reggie.bean.vo.OrderVo;
import com.bilubi.reggie.reggie.enums.OperateType;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface OrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Order record);

    int insertSelective(Order record);

    Order selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Order record);

    int updateByPrimaryKey(Order record);

    @AutoFill(value = OperateType.USERID)
    List<OrderVo> selectByUserId(Order record);

    List<OrderVo> selectByUserIdAndTime(Map<String, Object> map);
}